package com.study.talk.netty.message.request;


import com.study.talk.netty.message.MessageType;
import com.study.talk.netty.message.TalkMessage;

/**
 * 登录请求
 */

public class LoginRequest extends TalkMessage {

    //("用户名")
    private String username;

    //("密码")
    private String password;

    //("上线后是否发送消息缓存")
    private Boolean sendMessageCache = true;

    //("认证token")
    private String token;

    @Override
    public byte getType() {
        return MessageType.LOGIN_REQUEST;
    }

    public LoginRequest(String username, String password, Boolean sendMessageCache, String token) {
        this.username = username;
        this.password = password;
        this.sendMessageCache = sendMessageCache;
        this.token = token;
    }

    public LoginRequest(String dateTime, String username, String password, Boolean sendMessageCache, String token) {
        super(dateTime);
        this.username = username;
        this.password = password;
        this.sendMessageCache = sendMessageCache;
        this.token = token;
    }

    public LoginRequest() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getSendMessageCache() {
        return sendMessageCache;
    }

    public void setSendMessageCache(Boolean sendMessageCache) {
        this.sendMessageCache = sendMessageCache;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
